import pyautogui, json
from pynput import mouse

def task():

    colors = []

    def on_click(x: int, y: int, button, pressed):
        c = pyautogui.pixel(x, y)
        print(f'pick: {x}, {y}. get: {c}')
        colors.append({'r': c[0], 'g': c[1], 'b': c[2]})
            
        return False
    
    mlistener = mouse.Listener(on_click=on_click)
    mlistener.start()
    mlistener.join()
    
    return json.dumps(colors[0], ensure_ascii=False)

    